#include<iostream>
#include"Server.hpp"

int main()
{
    Server server;
    std::cout << "pos 1 " << std::endl;
    server.OpenPipeForRead();
    std::cout << "pos 2 " << std::endl;

    while(true)
    {   
        std::string message;
        if(server.RecvPipe(&message) > 0)
            std::cout << "client says# "<<message <<std::endl;
        else 
            break;
    }
    std::cout << "pos 3 " << std::endl;

    std::cout << "cliet quit, me too" << std::endl;
    server.ClosePipe();
    return 0;
}